.crate-row {
    --shadow: 0 1px 3px light-dark(hsla(51, 90%, 42%, .35), #232321);

    display: flex;
    flex-wrap: wrap;
    padding: var(--space-s-m) var(--space-m-l);
    background-color: light-dark(white, #141413);
    border-radius: var(--space-3xs);
    box-shadow: var(--shadow);
}

.description-box {
    display: flex;
    flex-direction: column;
    width: 70%;
}

.name {
    color: var(--main-color);
    font-weight: bold;
    text-decoration: none;
    font-size: 120%;
    overflow-wrap: break-word;
}

.copy-button {
    color: var(--main-color);
    cursor: pointer;

    /* Hover selector for pointer only */
    /* See: https://github.com/rust-lang/crates.io/issues/10772 */
    @media (pointer: fine) {
        opacity: 0;
        transition: var(--transition-medium);

        .crate-row:hover & {
            opacity: .8;
            transition: var(--transition-instant);
        }

        .crate-row:hover &:hover, &:focus {
            opacity: 1;
            transition: var(--transition-instant);
        }
    }

    :global(svg) {
        vertical-align: top;
        height: 1rem;
        width: 1rem;
    }
}

.crate-spec {
    display: flex;
    flex-wrap: wrap;
    align-items: center;

    & > * {
        margin-bottom: calc(var(--space-xs) / 2);
    }
    & > :not(:last-child) {
        margin-right: var(--space-2xs);
    }
}

.description {
    margin-top: calc(var(--space-xs) / 2);
    line-height: 1.5;
}

.stats {
    width: 30%;
    color: var(--main-color-light);

    > * + * {
        margin-top: var(--space-xs);
    }

    :global(svg) {
        height: 1em;
        width: 1em;
        margin-right: var(--space-xs);

        flex-shrink: 0;

        &.download-icon {
            height: calc(1em + 20px);
            width: calc(1em + 20px);
            margin: -10px;
            margin-right: calc(var(--space-xs) - 10px);

            :global(circle) {
                fill: none;
            }
        }
    }
}

.downloads {
    display: flex;
    align-items: center;
}

.recent-downloads {
    display: flex;
    align-items: center;
}

.updated-at {
    display: flex;
    align-items: center;
}

ul.quick-links {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;

    font-size: 80%;
    list-style-type: none;
    margin: var(--space-xs) 0 0 0;
    padding: 0;

    > * + * {
        margin-left: var(--space-xs);
    }
}
